package com.sx.jys.ui.adapter

import android.content.Context
import androidx.recyclerview.widget.RecyclerView
import com.kunminx.binding_recyclerview.adapter.SimpleDataBindingAdapter
import com.sanxinsaas.nearstore.framework.util.click
import com.sx.jys.R
import com.sx.jys.app.framework.DiffUtilCallbacks
import com.sx.jys.app.net.bean.AccountBean
import com.sx.jys.databinding.ItemAccountBinding

class ItemAccountAdapter(context: Context):SimpleDataBindingAdapter<AccountBean,ItemAccountBinding>(context,
    R.layout.item_account,DiffUtilCallbacks().getItemCallBack()) {
    override fun onBindItem(
        binding: ItemAccountBinding,
        item: AccountBean,
        holder: RecyclerView.ViewHolder
    ) {
        binding.data=item
        binding.resetValue.click {
            mOnItemClickListener.onItemClick(it.id,item,holder.layoutPosition)
        }
    }
}